/**
 * http://usejsdoc.org/
 */

var http = require('http'),  //服务器创建
    url = require('url'),    //url处理 
    router = require('./router'); //路由加载

http.createServer(function(req, res) {
	var pathname = url.parse(req.url).pathname;
	req.setEncoding('UTF-8');
	res.writeHead( 200 , {"Content-Type":"text/html"});
	router.router(req, res, pathname);
}).listen(3000);

console.log("Sever Starting...");